﻿<?xml version="1.0" encoding="utf-8"?>
<xs:schema id="SchemaVersion100"
    targetNamespace="urn:NuGetCop.MSBuild"
    elementFormDefault="qualified"
    xmlns="urn:NuGetCop.MSBuild"
    xmlns:mstns="urn:NuGetCop.MSBuild"
    xmlns:xs="http://www.w3.org/2001/XMLSchema">

  <xs:element name="settings" type="mstns:settings" />
  
  <xs:complexType name="rule">
    <xs:attribute name="packageId" type="xs:string" use="required" />
    <xs:attribute name="version" type="xs:string" use="required" />
    <xs:attribute name="targetFramework" type="xs:string" use="required" />
    <xs:attribute name="isDevelopmentDependency" type="xs:boolean" default="0" use="optional" />
  </xs:complexType>

  <xs:complexType name="ArrayOfRules">
    <xs:sequence>
      <xs:element name="rule" minOccurs="0" maxOccurs="unbounded" type="rule" />
    </xs:sequence>
  </xs:complexType>
  
  <xs:complexType name="settings">
    <xs:sequence>
      <xs:element name="rules" minOccurs="0" maxOccurs="1" type="ArrayOfRules" />
    </xs:sequence>
    <xs:attribute name="version" type="xs:string" use="required" />
  </xs:complexType>
</xs:schema>
